import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/repairLogin'
    },
    {
      path: '/repairLogin',
      name: 'repairLogin',
      component: () => import('@/views/mRepair/login'),
      hidden: true},
    {
      path: '/repairLayout',
      name: 'repairLayout',
      component: () => import('@/views/mRepair/layout'),
      hidden: true,
      children: [
        {
          path: 'all',
          name: 'all',
          component: () => import('@/views/mRepair/repairRecordAll'),
          hidden: true,
          meta: {
            title: '所有维修记录'
          }
        },
        {
          path: 'details',
          name: 'details',
          component: () => import('@/views/mRepair/details'),
          hidden: true,
          meta: {
            title: '维修详情'
          }
        },
        {
          path: 'done',
          name: 'done',
          component: () => import('@/views/mRepair/done'),
          hidden: true,
          meta: {
            title: '上传维修完成凭证'
          }
        },
        {
          path: 'takedOrder',
          name: 'takedOrder',
          component: () => import('@/views/mRepair/takedOrder'),
          hidden: true,
          meta: {
            title: '已接单'
          }
        },
        {
          path: 'repairDone',
          name: 'repairDone',
          component: () => import('@/views/mRepair/repairDone'),
          hidden: true,
          meta: {
            title: '已维修'
          }
        },
        {
          path: 'me',
          name: 'me',
          component: () => import('@/views/mRepair/me'),
          meta: {
            title: '我的'
          }
        }
      ]
    }
  ]
})
